extends Node2D 
@onready var wall: TileMapLayer = $Env/Wall

func _ready() -> void:
	var mapRect :Rect2i = wall.get_used_rect().grow(-1)
	var tileSize = wall.tile_set.tile_size
 
	$Player/Camera2D.limit_left = mapRect.position.x * tileSize.x
	$Player/Camera2D.limit_top = mapRect.position.y * tileSize.y
	$Player/Camera2D.limit_right = mapRect.end.x * tileSize.x
	$Player/Camera2D.limit_bottom = mapRect.end.y * tileSize.y
	$Player/Camera2D.reset_smoothing()
